cmake_minimum_required(VERSION 3.21)
project(MyWebServer)

set(CMAKE_CXX_STANDARD 14)

SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-pthread")

add_executable(MyWebServer main.cpp config.cpp config.h
                                    webserver.cpp webserver.h
                                    lock/locker.h threadpool/threadpool.h
                                    database/mysql_conn_pool.cpp database/mysql_conn_pool.h
                                    timer/listed_timer.cpp timer/listed_timer.h
                                    log/logger.cpp log/logger.h
                                    epoller/epoller.cpp epoller/epoller.h
                                    http/http_request.cpp http/http_request.h
                                    http/http_response.cpp http/http_response.h
                                    http/http_connection.cpp http/http_connection.h)
target_link_libraries(MyWebServer mysqlclient)



#add_executable(timer_wheel_test timer/timer_wheel_test.cpp timer/timer_wheel.cpp timer/timer_wheel.h)
#add_executable(listed_timer_test  timer/listed_timer_test.cpp timer/listed_timer.cpp timer/listed_timer.h)
#add_executable(threadpool_test threadpool/threadpool_test.cpp threadpool/threadpool.h)
#add_executable(mysql_conn_pool_test database/mysql_conn_pool_test.cpp
#                                    database/mysql_conn_pool.h database/mysql_conn_pool.cpp
#                                    log/logger.h log/logger.cpp
#                                    lock/locker.h)
#target_link_libraries(mysql_conn_pool_test mysqlclient)

